<div class="page animated bounceInDown">

<Widget:show title="应用列表" col="12">
<Widget:action id="modelObj-action" title="">
    <a data-dialog class="btn btn-primary btn-sm" href="{:U("Index/add")}">新增</a>
</Widget:action>
<div class="table-responsive">
<volist name="apps" id="ap">
    <div class="col-sm-6 col-md-6">
        <div class="c-widget c-widget-custom c-widget-facebook c-widget-size-normal">
            <div class="c-widget-icon">
                <span class="icon icon-copy-document "></span>
            </div>
            <div class="c-wdiget-content-block">
                <div class="c-widget-content-heading">
                    {$ap.name}
                </div>
                <div class="c-widget-content-body">
                    <table class="table">
                        <tr>
                            <td>API_ID</td>
                            <td>{$ap.app_id}</td>
                        </tr>
                        <tr>
                            <td>API_KEY</td>
                            <td>{$ap.app_key}</td>
                        </tr>
                    </table>
                </div>
                <div class="c-widget-content-sub">
                    <a href="{:U("AcModel/index?code=$ap[code]")}">进入管理</a>
                    <a data-dialog href="{:U("Index/edit?code=$ap[code]")}">修改</a>
                    <a data-delete href="{:U("Index/delete?code=$ap[code]")}">删除</a>
                </div>
            </div>
        </div>
    </div>
</volist>
</div>
<div id="modelObj-pager" class="widget-footer"></div>
</Widget:show>


    
</div>

<script type="text/javascript">
$(function(){
    $('[data-delete]').confirmation({
        container: 'body',
        href:false,
        onConfirm:function(event, element){
            event.preventDefault();
            el  = $(element);
            var url = el.attr('href');
            $.get(url,function(req){
                $.bootstrapGrowl(req.info);
                var st = req.status;
                if (req.url == 'reload') {
                    var container = $('.page-container');
                    $.pjax.reload(container, {});
                };
            })
        }
    });
})    
</script>
